let arr = [1,2,3,1,3,1,3]
//1、filter + indexOf
function unique2(arr){
    let uniqueArr = arr.filter((item,index) => {
        return arr.indexOf(item) === index
    })
    console.log(uniqueArr)
}
unique2(arr)